import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SPetInfo } from "./SPetInfo";
type int = number;
//class SPetUpdate
    
    export  class SPetUpdate extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SPetUpdate();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            arg1.writeInt(this.updateType);
            arg1.writeString(this.uid);
            this.petInfo.__write(arg1);
            arg1.writeInt(this.bagType);
            arg1.writeInt(this.updateCode);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.updateType = arg1.readInt();
            this.uid = arg1.readString();
            this.petInfo = new SPetInfo();
            this.petInfo.__read(arg1);
            this.bagType = arg1.readInt();
            this.updateCode = arg1.readInt();
            return;
        }

        public /* const */_type: int=12026;

        public /* var */updateType: int;

        public /* var */uid: string;

        public /* var */petInfo: SPetInfo;

        public /* var */bagType: int;

        public /* var */updateCode: int;

        public static /* var */_regist: SPetUpdate;
    }

            SPetUpdate._regist = new SPetUpdate(true);
        